package(default_visibility = ["//visibility:public"])

load(
    "@io_bazel_rules_go//go:def.bzl",
    "go_library",
    "go_test",
)

go_test(
    name = "go_default_test",
    srcs = [
        "controller_test.go",
        "error_test.go",
        "reconciler_test.go",
    ],
    embed = [":go_default_library"],
    deps = [
        "//prow/apis/prowjobs/v1:go_default_library",
        "//prow/config:go_default_library",
        "//prow/kube:go_default_library",
        "//prow/pjutil:go_default_library",
        "@com_github_go_test_deep//:go_default_library",
        "@com_github_mohae_deepcopy//:go_default_library",
        "@com_github_sirupsen_logrus//:go_default_library",
        "@io_k8s_api//core/v1:go_default_library",
        "@io_k8s_apimachinery//pkg/api/errors:go_default_library",
        "@io_k8s_apimachinery//pkg/api/meta:go_default_library",
        "@io_k8s_apimachinery//pkg/apis/meta/v1:go_default_library",
        "@io_k8s_apimachinery//pkg/runtime:go_default_library",
        "@io_k8s_apimachinery//pkg/runtime/schema:go_default_library",
        "@io_k8s_apimachinery//pkg/types:go_default_library",
        "@io_k8s_apimachinery//pkg/util/clock:go_default_library",
        "@io_k8s_apimachinery//pkg/util/errors:go_default_library",
        "@io_k8s_apimachinery//pkg/util/sets:go_default_library",
        "@io_k8s_client_go//rest:go_default_library",
        "@io_k8s_client_go//tools/cache:go_default_library",
        "@io_k8s_sigs_controller_runtime//pkg/cache:go_default_library",
        "@io_k8s_sigs_controller_runtime//pkg/cache/informertest:go_default_library",
        "@io_k8s_sigs_controller_runtime//pkg/client:go_default_library",
        "@io_k8s_sigs_controller_runtime//pkg/client/fake:go_default_library",
        "@io_k8s_sigs_controller_runtime//pkg/controller/controllertest:go_default_library",
        "@io_k8s_sigs_controller_runtime//pkg/log:go_default_library",
        "@io_k8s_sigs_controller_runtime//pkg/log/zap:go_default_library",
        "@io_k8s_sigs_controller_runtime//pkg/manager:go_default_library",
        "@io_k8s_sigs_controller_runtime//pkg/reconcile:go_default_library",
    ],
)

go_library(
    name = "go_default_library",
    srcs = [
        "controller.go",
        "error.go",
        "reconciler.go",
    ],
    importpath = "k8s.io/test-infra/prow/plank",
    deps = [
        "//prow/apis/prowjobs/v1:go_default_library",
        "//prow/config:go_default_library",
        "//prow/crier/reporters/gcs/kubernetes/api:go_default_library",
        "//prow/kube:go_default_library",
        "//prow/pjutil:go_default_library",
        "//prow/pod-utils/decorate:go_default_library",
        "//prow/version:go_default_library",
        "@com_github_sirupsen_logrus//:go_default_library",
        "@io_k8s_api//core/v1:go_default_library",
        "@io_k8s_apimachinery//pkg/api/errors:go_default_library",
        "@io_k8s_apimachinery//pkg/apis/meta/v1:go_default_library",
        "@io_k8s_apimachinery//pkg/labels:go_default_library",
        "@io_k8s_apimachinery//pkg/types:go_default_library",
        "@io_k8s_apimachinery//pkg/util/clock:go_default_library",
        "@io_k8s_apimachinery//pkg/util/sets:go_default_library",
        "@io_k8s_apimachinery//pkg/util/wait:go_default_library",
        "@io_k8s_sigs_controller_runtime//:go_default_library",
        "@io_k8s_sigs_controller_runtime//pkg/client:go_default_library",
        "@io_k8s_sigs_controller_runtime//pkg/controller:go_default_library",
        "@io_k8s_sigs_controller_runtime//pkg/handler:go_default_library",
        "@io_k8s_sigs_controller_runtime//pkg/manager:go_default_library",
        "@io_k8s_sigs_controller_runtime//pkg/predicate:go_default_library",
        "@io_k8s_sigs_controller_runtime//pkg/reconcile:go_default_library",
        "@io_k8s_sigs_controller_runtime//pkg/source:go_default_library",
        "@org_golang_x_sync//semaphore:go_default_library",
    ],
)

filegroup(
    name = "package-srcs",
    srcs = glob(["**"]),
    tags = ["automanaged"],
    visibility = ["//visibility:private"],
)

filegroup(
    name = "all-srcs",
    srcs = [":package-srcs"],
    tags = ["automanaged"],
)
